<?php

/*
 *    Document   : dashboard
 *   Created on : Jun 10, 2011, 5:10:30 PM
 *    Author     : ClarkT AKA FalleN
 *    Company    : Amodity
 *    Web        : http://www.amodity.com
 *    Copyright  : 2011
 */

/*
 *  Admin Dashboard
 */

class Dashboard extends CI_Controller {

    public function __construct() {
        parent::__construct();
        $this->load->model('admin/core');
        //if (ENVIRONMENT == 'development') {
        //  $this->output->enable_profiler(TRUE);
        //}
    }

    function index() {
        //is user logged in
        $this->core->_is_logged_in();
        //check permissions
        $this->core->_is_admin();

        $this->load->model('admin/users_model', 'users');
        $data = array(
            'active' => $this->users->get_user_status('active'),
            'suspended' => $this->users->get_user_status('suspended'),
            'pending' => $this->users->get_user_status('pending')
        );
        
        
        $this->template->set('testdata', $data);
        $this->template->set('title', lang('admin_dashboard'));
        $this->template->set('page_title', lang('admin_dashboard'));
        $this->template->load('templates/admin_template', 'admin_dashboard', $data, 'admin');
    }

}

?>